package com.sihai.ehr.service;

import java.util.List;

import com.sihai.core.Limit;
import com.sihai.core.LimitedList;
import com.sihai.core.Sorter;
import com.sihai.ehr.model.biz.ExamBaseConfig;
import com.sihai.ehr.model.sys.ExaminePeriodEnum;
import com.sihai.ehr.web.pojo.ExamBaseConfigPojo;

/**
 * author: wxn since: 12-10-10 Time: 下午6:40
 * 
 * 考核指标设定Service
 */
public interface ExamBaseConfigService {
	LimitedList<ExamBaseConfigPojo> findByTopOrganization(Long organizationId, Long dutyId, Limit limit, Sorter sorter);
	/**
	 * 根据组织岗位搜索考核对象配置情况
	 * @param organizationId
	 * @param dutyId
	 * @param limit
	 * @param sorter
	 * @return
	 */
	LimitedList<ExamBaseConfigPojo> searchQualConfigList(Long organizationId, Long dutyId, Limit limit, Sorter sorter);

	LimitedList<ExamBaseConfigPojo> findByOrganization(Long organizationId, Limit limit, Sorter sorter);

	ExamBaseConfig get(Long id);

	/**
	 * 根据职务编号获取标准配置
	 * 
	 * @param dutyId
	 * @return
	 */
	ExamBaseConfig getExamBaseConfigByDutyId(Long dutyId);

	void save(ExamBaseConfig examBaseConfig);

	void saveForBatch(ExamBaseConfig examBaseConfig, String batchType,
			String batchIds);

	/**
	 * 根据考核天数限制获取需要考核的职务列表
	 * 
	 * @param periodEnum
	 *            周期类型
	 * @param day
	 *            当前考核期限
	 * @param isExamCurrent
	 *            考核当前周期否
	 * @return
	 */
	List<Long> searchCurExamDutysByDayLimit(ExaminePeriodEnum periodEnum,
			int day, boolean isExamCurrent);
}
